package controller;

import model.Product;
import model.data.ProductStore;
import model.data.container.ProductContainer;

public class ProductController {
	private ProductStore productStore;
	private Product product = new Product();
	
	/** Constructs a new product controller */
	public 	ProductController() {
		this.productStore = new ProductContainer();
	}
	
	/** Adds a new product 
	 * @throws Exception */
	public void addProduct() throws Exception {
		product = new Product();
		productStore.write(product);
	}
	
	/** Updates a new product 
	 * @throws Exception */
	public void updateProduct() throws Exception{
		product = new Product();
		productStore.write(product);
	}
	
	/** Removes a new product 
	 * @throws Exception */
	public void removeProduct() throws Exception{
		product = new Product();
		productStore.delete(product);
	}
	
}